Add support for both prepending and appending custom menu items.
authorEmmanuele Bassi <ebassi@gnome.org>
Fri, 9 Feb 2007 14:24:19 +0000 (14:24 +0000)
committerEmmanuele Bassi <ebassi@src.gnome.org>
Fri, 9 Feb 2007 14:24:19 +0000 (14:24 +0000)
commit4a559d6ec8c1400b5d14913e2bd77621a86a0dc3
tree98afd8f8ba6f08a71fc2b446acae7b72400ccd45
parent661a6bc0211f5db1678e1892a4976f19bfbfa436
Add support for both prepending and appending custom menu items.

2007-02-09  Emmanuele Bassi  <ebassi@gnome.org>

* gtk/gtkrecentchoosermenu.c: Add support for both prepending
and appending custom menu items.

(gtk_recent_chooser_menu_constructor): Add a placeholder menu
item for the empty menu case, and for giving us a starting
point for the recent items populating process.

(gtk_recent_chooser_menu_insert_item),
(gtk_recent_chooser_menu_dispose_items): Insert an item at
the position following the placeholder (and find that position
if needed).

(idle_populate_func), (idle_populate_clean_up): Show the
placeholder menu item, instead of creating one each time.

(gtk_recent_chooser_menu_populate): Kill some indirections
and hide the placeholder before populating the menu.

(set_recent_manager): Remember to remove the idle population
source if the manager changes.

* tests/testrecentchoosermenu.c: Test the appending and
prepending of the menu items to the recent chooser menu
widget.

svn path=/trunk/; revision=17281
ChangeLog
gtk/gtkrecentchoosermenu.c
tests/testrecentchoosermenu.c